/* $Id: SvgaCmd.h $ */
/** @file
 * VirtualBox Windows Guest Mesa3D - VMSVGA command encoders.
 */

 /*
  * Copyright (C) 2016-2020 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
  * available from http://www.virtualbox.org. This file is free software;
  * you can redistribute it and/or modify it under the terms of the GNU
  * General Public License (GPL) as published by the Free Software
  * Foundation, in version 2 as it comes in the "COPYING" file of the
  * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */

#ifndef _WDDM_INCLUDE_GALLIUM_SVGACMD_H_
#define _WDDM_INCLUDE_GALLIUM_SVGACMD_H_

#include "CommonDef.h"
#include "SvgaHw.h"

void SvgaCmdDefineScreen(void* pvCmd, UINT32 u32Id, bool fActivate,
    INT32 xOrigin, INT32 yOrigin, UINT32 u32Width, UINT32 u32Height,
    bool fPrimary, UINT32 u32VRAMOffset, bool fBlank);
void SvgaCmdDestroyScreen(void *pvCmd, UINT32 u32Id);
void SvgaCmdUpdate(void* pvCmd, UINT32 u32X, UINT32 u32Y, UINT32 u32Width, UINT32 u32Height);
void SvgaCmdDefineCursor(void* pvCmd, UINT32 u32HotspotX, UINT32 u32HotspotY, UINT32 u32Width, UINT32 u32Height,
    UINT32 u32AndMaskDepth, UINT32 u32XorMaskDepth,
    void const* pvAndMask, UINT32 cbAndMask, void const* pvXorMask, UINT32 cbXorMask);
void SvgaCmdDefineAlphaCursor(void* pvCmd, UINT32 u32HotspotX, UINT32 u32HotspotY, UINT32 u32Width, UINT32 u32Height,
    void const* pvImage, UINT32 cbImage);
void Svga3dCmdDefineContext(void *pvCmd, UINT32 u32Cid);
void Svga3dCmdDestroyContext(void *pvCmd, UINT32 u32Cid);
void Svga3dCmdBlitSurfaceToScreen(void *pvCmd, UINT32 sid,
                                  RECT const *pSrcRect,
                                  UINT32 idDstScreen,
                                  RECT const *pDstRect,
                                  UINT32 cDstClipRects,
                                  RECT const *paDstClipRects);
void SvgaCmdDefineGMRFB(void *pvCmd, UINT32 u32Offset, UINT32 u32BytesPerLine);
void SvgaCmdBlitGMRFBToScreen(void *pvCmd, UINT32 idDstScreen, UINT32 xSrc, UINT32 ySrc,
                              UINT32 xLeft, UINT32 yTop, UINT32 xRight, UINT32 yBottom);
void SvgaCmdBlitScreenToGMRFB(void *pvCmd, UINT32 idSrcScreen, UINT32 xSrc, UINT32 ySrc,
                              UINT32 xLeft, UINT32 yTop, UINT32 xRight, UINT32 yBottom);
void Svga3dCmdSurfaceDMAToFB(void *pvCmd, UINT32 u32Sid, UINT32 u32Width, UINT32 u32Height, UINT32 u32Offset);
void Svga3dCmdSurfaceDMA(void *pvCmd, SVGAGuestImage const *pGuestImage, SVGA3dSurfaceImageId const *pSurfId,
                         SVGA3dTransferType enmTransferType, UINT32 xSrc, UINT32 ySrc,
                         UINT32 xDst, UINT32 yDst, UINT32 cWidth, UINT32 cHeight);
void svga3dCmdSurfaceCopy(void *pvCmd, SVGA3dSurfaceImageId const *pSrcId,
                          SVGA3dSurfaceImageId const *pDstId, UINT32 xSrc, UINT32 ySrc,
                          UINT32 xDst, UINT32 yDst, UINT32 cWidth, UINT32 cHeight);
void Svga3dCmdDestroySurface(void *pvCmd, UINT32 u32Sid);
void Svga3dCmdDefineSurface(void *pvCmd, UINT32 sid, GASURFCREATE const *pCreateParms,
                            GASURFSIZE const *paSizes, UINT32 cSizes);
void SvgaCmdFence(void *pvCmd, UINT32 u32Fence);

#endif
